
updateEtaCardOK = function () {
    var reservationsId = $('#reservationsId').val();
    var str = [];
    var endtr = "";

    if($(".dealId").length==0) {
        alert("无对应项目！");
        return;
    }
    for (var i = 0; i < $(".dealId").length; i++) {
        endtr = $(".dealId").eq(i).val() + "#" + $(".etaCard").eq(i).val()+ "#" + $(".etaCardY").eq(i).val()+ "#" + $(".payServiceName").eq(i).html();
        str.push(endtr)
    }
    $.ajax({
        url: Feng.ctxPath + "/customer/updateEtaCardOK",
        type: "post",
        traditional: true,
        data: {
            "reservationsId": reservationsId,
            "str": str
        },
        success: function (data) {
            $("#return").html(data);
            if(data == "操作成功!"){
                window.parent.Customer.table.refresh();
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            }
        },
        error: function (data) {
            alert("没有权限，请联系系统管理员！");
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        }
    });
};
